import demo from './router.demo';

export default [
  {
    path: '/login',
    component: '../layouts/LoginLayout',
    routes: [
      {
        path: '/login',
        component: './login'
      },
      {
        component: '404'
      }
    ]
  },
  {
    path: '/',
    component: '../layouts/AuthBasicLayout',
    // Routes: ['./src/pages/Authorized'],
    routes: [
      {
        path: '/',
        redirect: '/dashboard'
      },
      {
        path: '/dashboard',
        name: '首页',
        component: './dashboard',
        icon: 'home'
      },
      demo,
      {
        path: '/system',
        component: '../components/Panel',
        name: '系统',
        title: '系统管理',
        icon: 'gears',
        // system: true,
        routes: [
          {
            path: '/system',
            redirect: '/system/user'
          },
          {
            path: '/system/user',
            component: './user',
            name: '用户管理',
            icon: 'user',
            selected: true,
            // authority: 'USER_VIEW'
          },
          {
            path: '/system/group',
            component: './group',
            name: '部门管理',
            icon: 'sitemap',
            hideMenu: true,
            routes: [{
              path: '/system/group',
              redirect: '/system/group/roles'
            }, {
              path: '/system/group/roles',
              component: './group/role',
              name: '角色列表',
              selected: true,
            }, {
              path: '/system/group/users',
              component: './group/user',
              name: '用户管理'
            }]
            // authority: 'ORG_VIEW'
          },
          {
            path: '/system/role',
            component: './role',
            name: '角色管理',
            // authority: 'ROLE_VIEW',
            icon: 'user-circle-o'
          },
          {
            path: '/system/auth',
            component: './auth',
            name: '权限管理',
            // authority: 'AUTH_VIEW',
            icon: 'lock'
          },
          {
            path: '/system/dictionary',
            component: './dictionary',
            name: '数据字典',
            icon: 'book'
          },
          {
            path: '/system/logs',
            component: './logs',
            name: '操作日志',
            // authority: 'LOG_VIEW',
            icon: 'paw'
          }
        ]
      },
      {
        path: '/exception/403',
        component: './exception/403',
        hide: true
      },
      {
        path: '/exception/500',
        component: './exception/500'
      },
      {
        component: '404'
      }
    ]
  }
];
